package com.kye.express.business.found.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.kye.express.business.found.subfragment.FoundNewsFragment;
import com.kye.express.business.found.subfragment.FoundVideoFragment;
import com.kye.express.business.found.subfragment.FoundWelfareFragment;
import com.kye.express.business.found.tab.FoundTabType;

public class FoundViewPageAdapter extends FragmentPagerAdapter {

    public FoundViewPageAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        if (position == 0) {
            return FoundWelfareFragment.newInstance();
        } else if (position == 1) {
            return FoundNewsFragment.newInstance();
        } else {
            return FoundVideoFragment.newInstance();
        }
    }

    @Override
    public int getCount() {
        return 3;
    }
}
